import { _decorator, director } from 'cc';
export class MyEvent {
    public static PAUSE: string = "PAUSE";
}

export class EventManager {
    public static get Scene() {
        return director.getScene();
    }
    public static on(type: string, callback: Function, target?: any) {
        director.getScene().on(type, callback, target);
    }
    public static off(type: string, callback?: Function, target?: any) {
        director.getScene()?.off(type, callback, target);
    }

    public static emit(type: string, ary: any[] = []) {
        director.getScene()?.emit(type, ...ary);
    }
}

